#include "Music.h"

Music::Music(void)
{
	mp3Strewam = NULL;
}

Music::~Music(void)
{
}

void Music::LoadMusic(const char *filename)
{
	BOOL results;
	results = BASS_Init(-1, 44000, 0, NULL, NULL);
	if (results)
	{
		mp3Strewam = BASS_StreamCreateFile(false, filename, 0, 0, 0);
	}
}

void Music::Play()
{
	BASS_ChannelPlay(mp3Strewam, true);
}

void Music::Stop()
{
	if (mp3Strewam != NULL)
		BASS_StreamFree(mp3Strewam);

	BASS_Free();
}
